<template>
  <view class="content">
    <!-- 公共组件-每个页面必须引入 -->
    <public-module></public-module>
	<div class="index-page">
		<div class="search-div" @click="toNewPage('/pagesSearch/searchList')" style="height:32px;background-color: rgb(255, 255, 255);border-radius: 9px;border-color: transparent;display: flex;
    flex-direction: row;align-items: center;padding: 0 10px;flex: 1;justify-content: flex-start;border-width: 1px;border-color: transparent;border-style: solid;overflow: hidden;">
			<!-- <u-search placeholder="输入牌号/品名/厂家等关键词" shape="round" 
			bgColor="#fff" 
			:showAction="false" 
			disabled 
			></u-search> -->
			<u-icon name="search" size="24"></u-icon>
			<div style="font-size:14px;color:#808080">输入牌号/品名/厂家等关键词</div>
		</div>
		<div class="msg-div" v-if="messageCount > 0">
			<div>
				<img src="https://pic.moresu.com/FhIYHFni-pz5--9SfRK49KnRbUl0" style="width:23rpx;height:20rpx"/>
			</div>
			<div style="width:calc(100% - 40rpx)">
				<h-carousel-roll :list="messageList" :textShow="false" :timeShow="false" titleColor="#FF851C" title="messageContent" :interval="2000" @active="toMsgLink"></h-carousel-roll>
			</div>
		</div>
		<div class="index-ad">
			 <u-swiper
				radius='18rpx'
				keyName="adImage"
				:list="info.adList"
				height="348rpx"
				@click="clickAD"
				indicator
				indicatorMode="line"
			></u-swiper>
		</div>
		
		<div class="index-block">
			<div class="menu-block" style="padding-top:30rpx;">
				<div class="home-class-item" @click="toTab('/pages/public/addInquiry')" style="position: relative;">
					<img src="https://pic.moresu.com/FlWTAw8lj5B67JlF2NgcQsbRK6tD" class="img" > 
					<img src="https://pic.moresu.com/FiEmPxRunzlVv8EBCuQvgZo3jhSs" style="width:40rpx;height:40rpx;position: absolute;right:-10rpx;top:-12rpx"/>
				    <div class="text">发布询价</div>
				</div>
				<div class="home-class-item" @click="toPrice(0)">
					<img src="https://pic.moresu.com/FgTBOay2MKY9ckdRSal3Dm9x2vM9" class="img" > 
				    <div class="text">价格行情</div>
				</div>
				<div class="home-class-item" @click="toNewPage('/pagesCommon/goodsList')">
					<img src="https://pic.moresu.com/Fiutdv9cLoVqRir0d5Zr2_as2Dci" class="img" > 
				    <div class="text">今日力推</div>
				</div>
				
				<div class="home-class-item"   @click="toNewPage('/pagesCommon/goodsListNew')">
					<img src="https://pic.moresu.com/Fpas9UTrV9CANzEehFzbjGDPDlLk" class="img"> 
				    <div class="text">在线商城</div>
				</div>		
			</div>
			<div class="menu-block" style="padding-bottom:30rpx">
				<div class="home-class-item" style="margin-top:36rpx" @click="toTab('/pages/inquiry/inquiryList')">
					<img src="https://pic.moresu.com/Fgd8O6O4GLU2HyOVLHVFsvwgvUXV" class="img"> 
				    <div class="text">询价大厅</div>
				</div>
				<div class="home-class-item" style="margin-top:36rpx" @click="toNewPage('/pagesCommon/newList')">
					<img src="https://pic.moresu.com/FmWRprzS_loKGpIFrAL_fk8i98qK" class="img"> 
				    <div class="text">摩塑头条</div>
				</div>
				<div class="home-class-item" style="margin-top:36rpx" @click="toNewPage('/pagesIntegral/integral')">
					<img src="https://pic.moresu.com/FuycMfMYnsh8EZGmT3soFGfBrGmj" class="img"> 
				    <div class="text">积分商城</div>
				</div>
				<div class="home-class-item"  style="margin-top:36rpx" @click="toNewPage('/pagesCommon/exhibitionList')">
					<img src="https://pic.moresu.com/Fpz4myrrY8WbtQeKJ3M1r1Wp-AkA" class="img"> 
				    <div class="text">展会推荐</div>
				</div>
				
			</div>	
		</div>
		
		<div class="index-zt">
			<z-swiper v-model="info.specialList" :options="options">
				<z-swiper-item v-for="(item,index) in info.specialList" :key="index">
					<div class="zt-item" @click="toNewPage(item.adLink)">
						 <img :src="item.adImage" style="width:100%;height:100%;"/>
					 </div>	
				</z-swiper-item>
			</z-swiper>
			
				<!-- <div class="zt-item" v-for="item in info.specialList" :key="item.adId" @click="toNewPage(item.adLink)">
					 <img :src="item.adImage" style="width:100%;height:100%;"/>
				 </div>	 -->
		</div>
	
		<div class="index-block">
			<div class="indexPage-block-title" @click="toPrice(ptId)">
				<div class="price-left">
					<img src="https://pic.moresu.com/Fje4UVabMWXZofcsLKUQ876gjEOC" style="height: 32rpx;width:32rpx;">
					<span style="padding-left:20rpx">价格行情</span> 
				</div>
				
				<div class="more-span">
					<span>查看更多</span> 
					<img src="https://pic.moresu.com/Fhw8DXyIA4AxK9Bdd9OmKNo8fm1n" style="width: 56rpx;height:56rpx">
				</div>
			</div>
			<div>
				<u-tabs :list="priceTypes" keyName="ptName" lineWidth="0" lineColor="#fff" @click="getPriceList" 
				:activeStyle="{color: '#fff' ,'font-size': '22rpx','padding':'0 8px','background': '#FF5E01','border-top-left-radius': '16rpx','border-top-right-radius': '16rpx'}" 
				:inactiveStyle="{color: '#8B8B8B' ,'font-size': '22rpx'}"></u-tabs>
			</div>
			<div  style="width: 100%;height: 400rpx;">
				<qiun-data-charts type="area" :chartData="chartData" :opts="opts" :canvas2d='true'/>
			</div>
		</div>
		
		<div class="index-block">
			<div class="indexPage-block-title" @click="toTab('/pages/inquiry/inquiryList')">
				<div class="price-left">
					<img src="https://pic.moresu.com/Fucb8NR6PW29Og-Dqk14sar9fyGj" style="height: 32rpx;width:32rpx;">
					<span style="padding-left:20rpx">最新询价</span> 
				</div>
				
				<div class="more-span">
					<span>查看更多</span>
					<img src="https://pic.moresu.com/Fhw8DXyIA4AxK9Bdd9OmKNo8fm1n" style="width: 56rpx;height:56rpx">
				</div>
			</div>
			<div class="inquiry-list">
				<div class="inquiry-item" v-for="item in info.inquiryList"  :key="item.inquiryId" @click="toNewPage('/pages/inquiry/inquiryInfo?inquiryId='+item.inquiryId)">
					<div class="inquiry-title">{{item.inquiryTitle}}</div>
					<div class="inquiry-attar">
						<div class="attar-item">
							<img src="https://pic.moresu.com/FvRHG8lTvR-fQsAY7hMspuG2Th-4" style="width:19rpx;height:19rpx;margin-right:10rpx">
							<span>交期：{{item.receiveDate}}</span>
						</div>
						<div class="attar-item">
							<img src="https://pic.moresu.com/FiuxNTl4uFChOXCsDlTD1ck5detS" style="width:24rpx;height:21rpx;margin-right:10rpx">
							<span>数量：{{item.goodsNum}}吨</span>
						</div>	
					</div>
					<div class="inquiry-attar">
						<div class="attar-item">
							<img src="https://pic.moresu.com/FmBBliEqF01CHCwq-w84yloideIO" style="width:19rpx;height:21rpx;margin-right:10rpx">
							<span>地址：{{item.receiveArea}}</span>
						</div>
					</div>
				</div>
			</div>
			
		</div>
		
		
		<div class="index-block">
			<div class="indexPage-block-title" @click="toNewPage('/pagesCommon/newList')">
				<div class="price-left">
					<img src="https://pic.moresu.com/FhDLlpXVL9sRzP6PDIlKyNLB8OnB" style="height: 32rpx;width:32rpx;">
					<span style="padding-left:20rpx">最新资讯</span> 
				</div>
				
				<div class="more-span">
					<span>查看更多</span>
					<img src="https://pic.moresu.com/Fhw8DXyIA4AxK9Bdd9OmKNo8fm1n" style="width: 56rpx;height:56rpx">
				</div>
			</div>
			<div class="new-list">
				<div class="new-item" v-for="item in newList" :key="item.newsId" @click="toNewPage('/pagesCommon/newInfo?newsId='+item.newsId)">
					<div class="img">
						<img :src="item.newsImage" style="width:94rpx;height:94rpx;object-fit: contain;"/>
					</div>
					<div class="new-con">
						<div class="new-title">{{item.newsTitle}}</div>
						<div class="new-text">{{item.newsWords}}</div>
					</div>
				</div>
				
			</div>
		</div>
		
		<div class="index-block">
			<div class="indexPage-block-title" @click="toNewPage('/pagesCommon/goodsList')">
				<div class="price-left">
					<img src="https://pic.moresu.com/FvlyHJj2CyXh0DqgwpufXu6Jdqed" style="height: 32rpx;width:32rpx;">
					<span style="padding-left:20rpx">今日力推</span> 
				</div>
				
				<div class="more-span">
					<span>查看更多</span>
					<img src="https://pic.moresu.com/Fhw8DXyIA4AxK9Bdd9OmKNo8fm1n" style="width: 56rpx;height:56rpx">
				</div>
			</div>
			
			<div class="goods-list" style="max-height:580rpx;overflow: auto;">
				<div class="goods-item" v-for="item in goodsList" :key="item.goodsId"  @click="toInfo(item)">
					<div class="goods-top">
						<div class="goods-name">{{item.goodsName}}</div>
						<div class="goods-price">￥{{item.price}}</div>
					</div>
					<div class="goods-attar">
						<span>库存：{{item.stock}}</span>
						<span style="padding-left:30rpx">交货地：{{item.area}}</span>
					</div>
				</div>	
			</div>		
		</div>
		
		<div class="index-block">
			<div class="indexPage-block-title" @click="toNewPage('/pagesCommon/goodsListNew')">
				<div class="price-left">
					<img src="https://pic.moresu.com/FvlyHJj2CyXh0DqgwpufXu6Jdqed" style="height: 32rpx;width:32rpx;">
					<span style="padding-left:20rpx">在线商城</span> 
				</div>
				
				<div class="more-span">
					<span>查看更多</span>
					<img src="https://pic.moresu.com/Fhw8DXyIA4AxK9Bdd9OmKNo8fm1n" style="width: 56rpx;height:56rpx">
				</div>
			</div>
		</div>	
			
		<div class="con-list-div" style="padding:0;padding-top:24rpx;display: flex;justify-content: space-between;align-items: flex-start;flex-wrap: wrap;">
			<div class="goods-list-item" v-for="(item,index) in list" :key="item.goodsId" @click="toInfo(item)" style="width:calc(50% - 12rpx);margin-bottom:24rpx;">
				<div style="width:274rpx;height:274rpx;border:1px solid #eee;border-radius: 18rpx;overflow: hidden;">
					<img :src="item.goodsPic" style="width:100%;height:100%;object-fit: contain;"/>
				</div>
				<div style="position: relative;height:160rpx">
					<div class="goods-top" style="margin-top:20rpx;display: block;">
						<div class="goods-name" style="font-weight: bold;">{{item.categoryName2}}/{{item.brandName}}</div>
						<div class="goods-name" style="font-weight: bold;">{{item.goodsSn}}</div>
					</div>
					<!-- <div class="goods-arrt" style="margin-top:10rpx;color:#888;font-size:24rpx"> 库存数量：{{item.stock}}</div>
					<div class="goods-arrt" style="color:#888;font-size:24rpx"> 交货地址：{{item.area}}</div> -->
					<div class="goods-price" style="color: #ff4600;font-size: 32rpx;font-weight: bold;position: absolute;bottom:0" v-if="item.price != '电议'">
						<span >￥</span>{{item.price}}/吨
					</div>
					<div class="goods-price" style="left:50%;margin-left:-50px;position: absolute;bottom:0;background:#FF5E01;color:#fff;width: 100px;height: 26px;line-height:24px;border:1px solid #FF5E01;border-radius:17px;font-size: 12px;text-align: center;" v-else @click.stop="toaddInquiry(item)">
						询价
					</div>
				</div>
			</div>
		</div>
		<div style="padding-bottom:40rpx;">
		   <u-loadmore :status="status" ></u-loadmore>
		</div>
	</div>

	<f-tabbar  ref="fTabbar"></f-tabbar>
	
	<div class="qd-div" @click="closedPop()" v-if="showqd">
	      <div @click.stop>
	        <div class="qd-con">
	           <div class="qd-list">
	             <div v-for="(item,index) in qdlist" class="qd-item" :class="{'bottom-item':index > 3,'choose-item':index < continuousDays}" :key="item">
	                  <div style="font-size: 24rpx;margin-top:26rpx;letter-spacing: 2rpx">第{{item}}天</div>
	                  <div style="padding-top: 16rpx">
	                     <img src="https://pic.moresu.com/FqoJTbPDC9dqMS134yX5vsnemOdu"  v-if="index < continuousDays" style="width:50rpx;height:50rpx;display: inline-block;"/>
	                     <img src="https://pic.moresu.com/FgB6YjAXEuK0VipNBI136V9LxqsZ"  v-else style="width:50rpx;height:50rpx;display: inline-block;"/>
	                  </div>
	             </div>
	             <div style="clear: both"></div>
	             <div style="padding:24rpx 18rpx 0 18rpx">
	               <div
	                 @click.stop="qdclick"
	                 style="cursor:pointer;text-align:center;height: 59rpx;background: linear-gradient( 180deg, #FF6F00 0%, #FF5902 100%);border-radius: 38rpx;color:#fff;font-size: 24rpx;line-height: 59rpx">
	                 签到领积分
	               </div>
	             </div>
	           </div>
	
	        </div>
	        <div class="qd-closed" @click="closedPop"><i class="el-icon-circle-close" style="font-size: 36px;color:#fff;cursor: pointer"/></div>
	      </div>
	
	    </div>
	
  </view>
</template>

<script>
  import fTabbar from '@/components/module/f-tabbar/f-tabbar';
  import {shareCode,indexData,categoryPriceTypes,categoryPrice,getNewsList,pcGoodsList,pageSeo,checkIsBusiness,setScanCodeLog} from '@/config/api.js'
  import {
    messageList,
    messageSetView
  } from '@/config/api2.js'
  import {getSignInfo,setSign} from '@/config/coupon.js'
  
  import{saveShareUid,saveSource}  from '@/plugins/utils.js'
  import store from '@/store';

  
  
  export default {
    components: {
     fTabbar
    },
    data() {
      return {
        shareTitle:'',
        qrCode:'',
        shareImage:'',
		chartData: {},
		opts: {
			    dataLabel:false,
				fontSize:8,
		        color: ["#fa7839"],
		        
		        enableScroll: false,
		        legend: {},
		        xAxis: {
		          disableGrid: true,
				  fontSize:6
		        },
		        yAxis: {
		          gridType: "dash",
		          dashLength: 2
		        },
		        extra: {
		          area: {
		            type: "curve",
		            opacity: 0.2,
		            addLine: true,
					gradient: true,
		            width: 2,
		          }
		        }
		},
		priceTypes:[],
	    info:{},
		dayNum:7,
		ptId:'',
		newList:[],
		goodsList:[],
        messageList:[],
		messageCount:0,
		
		status: 'loadmore',
		list: [],
		pageNum: 0,
		pageSize:10,
		count:0,
		options:{
			slidesPerView : 2,
			spaceBetween : 12,
			autoplay: {
			    delay: 2000,//1秒切换一次
				disableOnInteraction: false,
			  },
		    loop : true
		},
		showqd:false,
		continuousDays:0,
		qdlist :['一', '二', '三', '四', '五', '六', '七']
      }
    },
	onReachBottom() {
		if(this.list.length >= this.count) {
			this.status = 'nomore';
			return ;
		}
		this.pageNum = ++ this.pageNum;
		this.getList()
	},
    async onLoad(options) {
		// 隐藏原生的tabbar
		uni.hideTabBar();
    	await this.$onLaunched;
      let self = this;
	  if(options.scene) { //分享进入
		  var splitStr = unescape(options.scene).split(",");
		  console.log(splitStr)
		  let pcodeIndex = splitStr.findIndex((item)=>{
				return item.indexOf('pcode') != -1
			})
		  splitStr.forEach((el) => {
			if (el.indexOf('pcode') != -1) {
			  let shareArry = el.split(":");
			  let pcode = shareArry[1];
			  saveShareUid(pcode);
			}
			if (el.indexOf('source') != -1) {
			  let sourceArry = el.split(":");
			  let source = sourceArry[1];
			  let pcode = ''
			  if(pcodeIndex != -1){
				  let shareArry = splitStr[pcodeIndex].split(":");
				  pcode = shareArry[1];
			  }
			  saveSource({source:source,pcode:pcode});
			  setScanCodeLog({source:source,pcode:pcode})
			}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
		  });
		}
		console.log("options",options)
		if(options.pcode){
		  saveShareUid(options.pcode)
		}
		this.list = [];
		this.clearData();
		this.getList();
		
		
	
    },
	async onShow() {
		await this.$onLaunched;
		this.getCode();
		this.getInfo();
		this.getPriceTypes();
		this.getNewsData();
		this.getGoodsList();
		this.getMsg()
		// #ifdef H5
			pageSeo({pageType: 'indexPage'}).then((res)=>{
				document.title = res.pageTitle;
			})
		// #endif
		let isShow = false
		if(uni.getStorageSync('qdClosed')){
		  let c = uni.getStorageSync('qdClosed')
		  isShow = this.isNoToday(c.time)
		}else{
		  isShow = true
		}
		getSignInfo().then((res)=>{
		   // this.showqd = res.isSign == 0 && isShow
		   this.showqd = false
		   this.continuousDays = res.continuousDays
		})
		
	},
	async onShareAppMessage(){
		await this.$onLaunched;
		let storeUserInfo = store.state.userInfo;
		return {
		      title: this.shareTitle,
		      path: '/pages/index/index?pcode='+storeUserInfo.promoterCode
		    }
	},

    methods: {
		qdclick(){
		      this.judgeLogin(() => {
				 setSign().then(()=>{
					 uni.showToast({
					   title: '签到成功！',
					   duration: 1000,
					   icon: 'none'
					 })
				   this.closedPop()
				 }).catch(()=>{
				   this.closedPop()
				 })
			  }) 
		      
		    },
		    closedPop(){
		       let data = {}
		       data.state = 'closed'
		       data.time = Date.now()
		        uni.setStorageSync('qdClosed',data)
		       this.showqd = false
		    },
		    //是否不在当天
		    isNoToday(timestamp) {
		      const date = new Date(timestamp); // 将时间戳转换为毫秒
		      const now = new Date(); // 当前时间
		
		      // 判断年、月、日是否相同
		      return (
		        date.getFullYear() !== now.getFullYear() ||
		        date.getMonth() !== now.getMonth() ||
		        date.getDate() !== now.getDate()
		      );
		    },
		toaddInquiry(item){
			getApp().globalData.goodsId = item.goodsId;
			uni.switchTab({
			  url: '/pages/public/addInquiry'
			});
		},
		//清除数据
		clearData(){
			this.pageNum = 1;
			this.list = [];
			this.status = 'loadmore';
			this.count = 0;
		},
		getList(){
			let data = {};
			data.pageSize = 10;
			data.pageNum = this.pageNum;
			this.status = 'loading';
			data.goodsShow = 1
		    return	pcGoodsList(data).then((res)=>{
				this.list = this.list.concat(res.list ? res.list : [] );
				this.count = res.count;
				if(this.list.length >= this.count) {
					this.status = 'nomore';
				}else{
					this.status = 'loadmore';
				}
			}).catch(()=>{
				this.status = 'loadmore';
			})
		},
		toMsgLink(item){
		  messageSetView({
			messageId: item.messageId
		  }).then(res => {
			  uni.navigateTo({
			  	url: item.locationUrl
			  })
		  })
		},
		getMsg(){
			this.messageList = []
			this.messageCount = 0
		      messageList({pageNum: 1,pagesize:1000,isView:0}).then((res)=>{
		          this.messageList = res.list
		          this.messageCount = res.count
		      })
		},
			
		toInfo(item){
			uni.navigateTo({
				url: '/pagesCommon/goodsInfo?goodsId='+item.goodsId
			})
		},
		toAddOrder(item){
			this.judgeLogin(() => {
				checkIsBusiness().then(()=>{
					uni.navigateTo({
					  url: '/pagesUser/order/addOrder?goodsId='+item.goodsId
					})
				})
				 
			})
		},
		
		getNewsData(){
			let data = {};
			data.isHot =  1
			data.newsType =  'INDUSTRY_NEWS'
			data.pageNum =  1
			data.pageSize =  3
			getNewsList(data).then((res)=>{
				this.newList = res.list
			})
		},
		getGoodsList(){
			let data = {};
			data.pageNum =  1
			data.pageSize =  10
			pcGoodsList(data).then((res)=>{
				this.goodsList = res.list
			})
		},
		toPrice(ptId){
			getApp().globalData.ptId = ptId;
			uni.switchTab({
			  url: '/pages/public/price'
			});
			
		},
	    getPriceTypes() {
		  categoryPriceTypes().then((res) => {
			this.priceTypes = res;
			this.getPriceList(this.priceTypes[0])
		  })
		},
		
		getPriceList(item){
			this.ptId = item['ptId']
			categoryPrice({ptId: this.ptId, dayNum: this.dayNum}).then((res) => {
				this.getServerData(item['ptName'],res.xList, res.yList)
			  })
		},
			
		clickAD(index){
			console.log("index",index)
			let item = this.info.adList[index]
			if(item.adLink){
				this.toNewPage(item.adLink)
			}
		},
		
		clickAD2(index){
			console.log("index",index)
			let item = this.info.specialList[index]
			if(item.adLink){
				this.toNewPage(item.adLink)
			}
		},
		
		getInfo(){
			let adType = 1
			// #ifdef H5
			adType = 2
			// #endif
	
			indexData({adType}).then((res)=>{
			
				this.info = res;
			})
		},
		//图表
		getServerData(ptName,x,y) {
			   console.log("ptName",ptName)
		      //模拟从服务器获取数据时的延时
		      setTimeout(() => {
		        //模拟服务器返回数据，如果数据格式和标准格式不同，需自行按下面的格式拼接
		        let res = {
		            categories: x,
		            series: [
		              {
		                name: ptName+'—最近7天统计',
		                data: y
		              },
		            ]
		          };
				  // console.log("---------------")
		        this.chartData = JSON.parse(JSON.stringify(res));
				 // console.log("+++++++++++++++")
		      }, 500);
		},
			 
		getCode(){
			shareCode({shareType:'mainPage'}).then((res)=>{
				this.shareTitle = res.shareTitle;
				this.qrCode = res.qrCode;
				this.shareImage = res.shareImage;
			})
		},
		toNewPage(url){
			console.log(url)
			uni.navigateTo({
				url: url
			})
		},
		toTab(url){
			uni.switchTab({
			  url: url
			});
		},
	}

  }
</script>

<style lang="scss">
@import '@/style/common.scss';
.qd-div{
	  position: fixed;
	  width:100%;
	  height:100vh;
	  z-index: 5;
	  background: rgba(0,0,0,0.5);
	  top:0;
	  left:0;
	  display: flex;
	  justify-content: center;
	  align-items: center;
	  .qd-con{
	    width:643rpx;
	    height:748rpx;
	    background: url("https://pic.moresu.com/FmKKngk2UnuGov2joiwldcoEq-tL");
		background-size: contain;
	    padding:255rpx 28rpx 0px 28rpx;
	    .qd-list{
	      width: 587rpx;
	      height: 455rpx;
	      background: #FFFFFF;
	      border-radius: 20rpx;
	      .bottom-item.qd-item{
	        width: 171rpx;
	        height: 151rpx;
	      }
	      .choose-item.qd-item{
	        background: #FFF9EB;
	        border: 2rpx solid #FFE7C2;
	        color: #FF6600;
	      }
	      .qd-item{
	        width: 124rpx;
	        height: 151rpx;
	        background: #F9F9F9;
	        border-radius: 12rpx;
	        float:left;
	        margin-left:18rpx;
	        margin-top:18rpx;
	        text-align: center;
	        color: #858585;
	      }
	    }
	  }
	  .qd-closed{
	    padding-top:10rpx;
	    text-align: center;
	  }
	}
	
.index-page{
	padding:20rpx;
	
	.index-zt{
		margin-top:20rpx;
		// overflow-y: auto;
		// white-space: nowrap;
		.zt-item{
			width:345rpx;
			height:180rpx;
			box-shadow: 0px 3rpx 6rpx 1rpx rgba(0,0,0,0.06);
			border-radius: 18rpx;
			margin-right:20rpx;
			overflow: hidden;
		}
		.zt-item:last-child{
			margin-right:0
		}
	}
	
	.goods-list-item{
		background: rgba(255,255,255,1);
		border-radius: 18rpx;
		padding:32rpx;
		box-shadow: 0px 0px 10px rgba(0,17,52,0.09);
		margin-bottom:30rpx;
		.goods-top{
			font-size: 28rpx;
			color: #070D14;
			@include flexbox(space-between,flex-start);
			.goods-name{
				padding-right:0rpx;
				@include textoverflow(3);
				word-break: break-all;
			}
			.goods-price{
				font-size: 30rpx;
				font-weight: bold;
				color: #FF3600;
			}
			
		}
		.goods-arrt{
			font-size: 24rpx;
			color: #B8B8B8;
			margin-top:10rpx;
		}
	}
	.msg-div{
		height: 48rpx;
		line-height: 48rpx;
		background: #FFE4CC;
		border-radius: 18rpx;
		margin-top:20rpx;
		font-size: 24rpx;
		color: #FF851C;
		overflow: hidden;
		padding:0 24rpx;
		@include flexbox(flex-start,center);
		.notice-bar-item{
			height: 48rpx;
			line-height: 48rpx;
			padding-left:10rpx;
			width:calc(100% - 200rpx)
		}
	}
	.index-ad{
		margin-top:20rpx;

	}
	
	.u-tabs__wrapper__scroll-view{
		border-bottom:4rpx solid #FF5E01
	}
	.u-tabs__wrapper__nav__item{
		height:60rpx !important
	}
	
	.u-tabs__wrapper__nav__item__text{
		display:block;
		line-height: 26px;
		height:26px;
		margin-bottom: -16rpx;
	}
	.index-block{
		margin-top:20rpx;
		background: rgba(255,255,255,1);
		box-shadow: 0px 0px 10rpx rgba(0,0,0,0.06);
		border-radius: 18rpx;
		padding:24rpx;
		.indexPage-block-title{
			font-size: 28rpx;
			font-weight: bold;
			line-height: 32rpx;
			color: #000000;
			@include flexbox(space-between,center);
			.price-left,.more-span{
				@include flexbox(flex-start,center);
			}
			.more-span{
				cursor: pointer;
				color: #ff5902;
				font-weight: 400;
				font-size: 24rpx;
				flex:none
			}
		}
	}
	.index-block .menu-block{
		@include flexbox(space-between,center);
		padding:0 6rpx;
		.home-class-item {
		    text-align: center;
		    font-size: 28rpx;
		    color: #333;
		    cursor: pointer;
			.img{
				width: 78rpx;
				height: 78rpx;
				display: block;
				border-radius: 50%;
				margin:0 auto;
				box-shadow: 0px 0px 8rpx rgba(0,0,0,0.16);
			}
			.text{
				font-size: 26rpx;
				color: #000000;
				margin-top:8rpx;
			}
		}
	}
	.inquiry-list{
		max-height:500rpx;
		overflow-y: auto;
		margin-top:20rpx;
		.inquiry-item{
			background: rgba(249,249,249,1);
			border-radius: 18px;
			padding:24rpx;
			margin-top:18rpx;
			.inquiry-title{
				font-size: 26rpx;
				color: #000000;
				padding-bottom:24rpx;
				border-bottom:1px dashed #C8C8C8;
				@include textoverflow(1);
				margin-bottom:20rpx;
			}
			.inquiry-attar{
				@include flexbox(space-between,flex-start);
				font-size: 20rpx;
				color: #8B8B8B;
				margin-top:10rpx;
				.attar-item{
					@include flexbox(flex-start,center);
					
				}
			}
		}
	}

	.new-list{
		.new-item{
			@include flexbox(flex-start,flex-start);
			margin-top:40rpx;
			.img{
				width:94rpx;
				height:94rpx;
			}
			.new-con{
				margin-left:40rpx;
				.new-title{
					font-size: 24rpx;
					color: #000000;
					@include textoverflow(1);
				}
				.new-text{
					@include textoverflow(2);
					font-size: 20rpx;
					color: #C5C5C5;
					margin-top:10rpx
				}
			}
		}
	}
	
	.goods-list{
		.goods-item{
			margin-top:40rpx;
			.goods-top{
				@include flexbox(space-between,center);
				.goods-name{
					font-size: 24rpx;
					color: #000000;
					padding-right:40rpx;
					@include textoverflow(1)
				}
				.goods-price{
					font-size: 24rpx;
					color: #FF5902;
				}
			}
			.goods-attar{
				font-size: 22rpx;
				color: #8B8B8B;
				margin-top:10rpx;
			}
		}
	}

}
 
 
</style>